<div class="workspace-viewer-header"></div>

<div class="workspace-viewer-container">

  {{#if exist}}

    <ul class="coding-rules-detail-properties">
      {{#if severity}}
        <li class="coding-rules-detail-property"
            data-toggle="tooltip" data-placement="bottom" title="{{t 'coding_rules.type.tooltip' this.type}}">
          <span class="little-spacer-right">{{issueTypeIcon this.type}}</span>{{issueType this.type}}
        </li>

        <li class="coding-rules-detail-property"
            data-toggle="tooltip" data-placement="bottom" title="Default rule severity">
          {{severityIcon severity}}&nbsp;{{t "severity" severity}}
        </li>
      {{/if}}

      {{#notEq status 'READY'}}
        <li class="coding-rules-detail-property"
            data-toggle="tooltip" data-placement="bottom" title="Rule status">{{status}}</li>
      {{/notEq}}

      <li class="coding-rules-detail-property coding-rules-detail-tag-list {{#if canWrite}}coding-rules-detail-tags-change{{/if}}"
          data-toggle="tooltip" data-placement="bottom" title="Rule tags">
        <i class="icon-tags"></i>
        <span>{{#if allTags}}{{join allTags ', '}}{{else}}{{t 'coding_rules.no_tags'}}{{/if}}</span>
      </li>

      <li class="coding-rules-detail-property">{{t 'coding_rules.available_since'}} {{d createdAt}}</li>

      {{#if debtRemFnType}}
        <li class="coding-rules-detail-property"
            data-toggle="tooltip" data-placement="bottom" title="{{t 'coding_rules.remediation_function'}}">
          {{t 'coding_rules.remediation_function' debtRemFnType}}:

          {{#if debtRemFnOffset}}{{debtRemFnOffset}}{{/if}}
          {{#if debtRemFnCoeff}}{{#if debtRemFnOffset}}+{{/if}}{{debtRemFnCoeff}}{{/if}}
          {{#if effortToFixDescription}}{{effortToFixDescription}}{{/if}}
        </li>
      {{/if}}

      <li class="pull-right spacer-left">
        <a class="icon-link" target="_blank" href="{{link permalink}}"></a>
      </li>

      <li class="pull-right">
        <span class="note">{{key}}</span>
      </li>
    </ul>

    <div class="coding-rules-detail-description rule-desc markdown">{{{htmlDesc}}}</div>

    {{#if htmlNote}}
      <div id="coding-rules-detail-description-extra">
        <div class="rule-desc markdown">{{{htmlNote}}}</div>
      </div>
    {{/if}}

  {{else}}

  {{! does not exist}}
    <div class="alert alert-warning">{{t 'workspace.no_rule'}}</div>

  {{/if}}

</div>
